package billrestauration.controllers;

import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

import javassist.NotFoundException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.ws.http.HTTPException;

import org.apache.commons.collections.map.HashedMap;
import org.apache.http.HttpException;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.web.servlet.ModelAndView;

public class ExceptionController  implements org.springframework.web.servlet.HandlerExceptionResolver{

	@Override
	public ModelAndView resolveException(HttpServletRequest request,
			HttpServletResponse response, Object handler, Exception ex) {
		// TODO Auto-generated method stub
		Locale l=request.getLocale();
		 
		Map<String, Object> model=new HashMap<String, Object> ();
	/*if(ex instanceof org.springframework.security.acls.model.NotFoundException){
		return new ModelAndView("404", model);
	}*/
		model.put("erreur", ex.getMessage());
		return new ModelAndView("403", model);
	}

}
